Make tree search match the package path of the test result (fixes #1077) - #3416
Open
zocek wants to merge 1 commit into
Open
Make tree search match the package path of the test result (fixes #1077)#3416zocek wants to merge 1 commit into
zocek wants to merge 1 commit into
Conversation
…ure-framework#1077) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Context
Searching on the Packages tab cannot find tests by their package path (fixes #1077).
Two things break it today:
name. In the Packages tab the group names are dot-collapsed package segments (e.g.io.qameta.allure→PullRequestsWebTest), so a query that spans segment boundaries (e.g.allure.PullRequestsWebTestor a full package path) matches no node name at all.byStatusesrequireschildren.length > 0) — so the user ends up with no results whatsoever.This change computes a
searchPathfor every tree node during normalization (normalizeNodes) — the dot-joined names of the node's ancestors plus its own name — and lets the tree text filter (byText) match it. A query for a package, a class, or any dotted-path substring now matches the leaves themselves, so the package is shown together with its tests. The fix is frontend-only and works for every data source, since the path is derived from the tree structure itself. The display is unchanged —searchPathis only consulted by the search.Since
byTextis shared tree plumbing, searching a group name on the Suites/Behaviors/Categories tabs now also reveals the tests inside that group instead of showing nothing, which matches the expectation described in the issue.Tests: Playwright e2e cases in
tree.shared.spec.mts— searching across collapsed package segments and by root package on the Packages tab, and searching a suite (class) name on the Suites tab. All three assertions fail without this fix.Checklist